import java.util.Scanner;

public class CarTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Car[] arr = new Car[3];
        for(int i = 0;i<3;i++) {
            Car c1 = new Car();
            System.out.println("请输入汽车的品牌:");
            String s = sc.next();
            c1.setBrand(s);
            System.out.println("请输入汽车的价格:");
            int p = sc.nextInt();
            c1.setPrice(p);
            System.out.println("请输入汽车的颜色:");
            String color1 = sc.next();
            c1.setColor(color1);
            arr[i] = c1;
        }
        for (int i = 0; i < 3; i++) {
            System.out.println("汽车的品牌:"+arr[i].getBrand()+", 汽车的价格:"+arr[i].getPrice()
                    +", 汽车的颜色:"+arr[i].getColor());

        }

    }
}
